#!/bin/env python

from game import *
a = ["2-kier", "2-karo", "2-pik", "2-trefl", "5-kier"]
b = ["5-kier", "2-kier", "2-karo", "2-pik", "2-trefl"]
c = ["2-kier", "2-karo", "2-pik", "3-trefl", "3-pik"]
d = ["2-kier", "2-karo", "2-pik", "3-trefl", "5-pik"]
e = ["A-kier", "K-kier", "J-karo", "K-pik", "K-trefl"]
f = ["A-kier", "K-kier", "A-karo", "K-pik", "10-trefl"]
g = ["2-kier", "5-karo", "2-pik", "3-trefl", "5-pik"]
h = ["2-kier", "10-karo", "2-pik", "A-trefl", "A-pik"]

results = {"straight flush" : 0,
	"four of a kind" : 0,
	"flush" : 0,
	"full house" : 0,
	"straight" : 0,
	"three of a kind" : 0,
	"two pair" : 0,
	"pair" : 0,
	"high cards" : 0}

r = results

def GuessHand(cards):
	#print "Sprawdzamy uklad: %s" % cards
	De = Dealer()
	if De._Dealer__IsSameColor(cards):
		if De._Dealer__Stairs(cards):
			#print "Straight Flush !!!"
			r["straight flush"] += 1
		else:
			r["flush"] += 1
	elif De._Dealer__FourOfAKind(cards):
		#print "Four of a Kind"
		r["four of a kind"] += 1
	elif De._Dealer__FullHouse(cards):
		#print "Full House"
		r["full house"] += 1
	elif De._Dealer__Stairs(cards):
		#print "Straight"
		r["straight"] += 1
	elif De._Dealer__ThreeOfAKind(cards):
		#print "Three of a Kind"
		r["three of a kind"] += 1
	elif De._Dealer__TwoPair(cards):
		#print "Two Pair"
		r["two pair"] += 1
	elif De._Dealer__Pair(cards):
		#print "Pair"
		r["pair"] += 1
	elif De._Dealer__HighCards(cards):
		#print "High Cards"
		r["high cards"] += 1

def Check(count):
	for i in range(count):
		GuessHand(Deck().Give(5))

Check(100000)

print r

